Skip to content

Conversation

@justinmk
Copy link
Member

No description provided.

Problem:
Version parsing makes some assumptions about the `nvim -v` output that
could be more robust. For example,
- "NVIM" may change to "Nvim": neovim/neovim@98ba65b
- "v" is not guaranteed to precede the version

Solution:
- match case-insensitive "NVIM"
- match "v?" instead of "v"
- Note: `--api-info` is not used because it is a big payload (thus
  requires streamed decoding, thus more complex code).
Problem:
parseVersion() does not handle invalid version strings. For example if
findNvim() passes a partial or invalid  version string, or undefined.

Solution:
- If compareVersions() arg 1 is invalid, throw an error.
- If compareVersions() arg 2 is invalid, treat it as "older"/"less".
@justinmk justinmk merged commit 4b80f5a into master Oct 15, 2024
10 checks passed
@justinmk justinmk deleted the versionparse branch October 15, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants